<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3"><span class="font-bold" translate="aside.nav.query.feeDetails"></span></h1>
</div>
<div ng-class="isSmart?'':'wrapper-md'" class="remove-wrapper">
    <div class="panel panel-default" style="margin-bottom: 0;">
        <div ng-controller="QueryFeeDetailsController" ng-init="init()">
            <form  class="form-horizontal" style="padding-bottom: 10px;padding-top: 10px;">
                <div class="row">
                    <div ng-controller="DatepickerDemoCtrl" class="col-xs-12 col-md-4" style="margin-bottom:5px;">
                        <div class="col-xs-4" style="min-width:90px;">
                            <label class="control-label" translate="business.servreq.paid_startdate"></label>
                        </div>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
							<span class="input-group-btn" ng-click="open($event)">
								<button class="btn btn-default">
									<i class="glyphicon glyphicon-calendar"></i>
								</button>
							</span>
                                <input type="text" class="form-control text-center" style="min-width: 100px"
                                       datepicker-popup="yyyy-MM-dd"
                                       is-open="opened"
                                       current-text="{{'common.today' | translate}}"
                                       clear-text="{{'common.clear' | translate}}"
                                       close-text="{{'common.close' | translate}}"
                                       datepicker-options="dateOptions"
                                       ng-required="true"
                                       close-text="Close"
                                       ng-model="item.startDate"
                                       max-date="item.finishDate"
                                       disabled
                                       autocomplete="off">
                            </div>
                        </div>
                    </div>
                    <div ng-controller="DatepickerDemoCtrl" class="col-xs-12 col-md-4" style="margin-bottom:5px;">
                        <div class="col-xs-4" style="min-width:90px;">
                            <label class="control-label" translate="business.servreq.paid_enddate"></label>
                        </div>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
							<span class="input-group-btn" ng-click="open($event)">
								<button class="btn btn-default">
									<i class="glyphicon glyphicon-calendar"></i>
								</button>
							</span>
                                <input type="text" class="form-control text-center" style="min-width: 100px"
                                       datepicker-popup="yyyy-MM-dd"
                                       is-open="opened"
                                       current-text="{{'common.today' | translate}}"
                                       clear-text="{{'common.clear' | translate}}"
                                       close-text="{{'common.close' | translate}}"
                                       datepicker-options="dateOptions"
                                       ng-required="true"
                                       close-text="Close"
                                       ng-model="item.finishDate"
                                       min-date="item.startDate"
                                       max-date="dt"
                                       disabled
                                       autocomplete="off">
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-4">
                        <div class="col-xs-12">
                            <button class="btn btn-success" translate="business.navtitle.search_patient" ng-click="query()"></button>
                            <button ng-if="!isSmart" class="btn btn-info" ng-click="exportToExcel('#queryFeedetails')">
                                <span>{{ (selectLang == 'English') ? 'export excel' : '\u5bfc\u51fa\u6570\u636e' }}</span>
                            </button>
                        </div>
                    </div>
                </div>
            </form>
           <div style="padding: 10px;">
               <table id="queryFeedetails" class="table table-bordered" style="background:#FFF;" ng-if="!isSmart">
                   <thead>
                   <tr class="panel-heading">
                       <th class="text-center" translate="common.number">No.</th>
                       <th class="text-center" translate="common.name">Username</th>
                       <th class="text-center" translate="business.patcase.disease_type"></th>
                       <th class="text-center" translate="business.servreq.paymentAmount"></th>
                       <th class="text-center" translate="business.servreq.amount_Operation"></th>
                       <th class="text-center" translate="business.servreq.amount_Regional"></th>
                       <th class="text-center" translate="business.servreq.Regional_name">Regional Name</th>
                       <th class="text-center" translate="business.servreq.amount_Expert"></th>
                       <th class="text-center" translate="business.servreq.Expert_name">Expert Name</th>
                       <th class="text-center" translate="business.servreq.amount_Operator"></th>
                       <th class="text-center" translate="business.servreq.Operator_name">Operator Name</th>
                       <th class="text-center" translate="business.servreq.amount_Platform"></th>
                       <th class="text-center" translate="business.accumulation.dateOpe" class="text-center"></th>
                       <th class="text-center" translate="business.servreq.paid_Date"></th>
                   </tr>
                   </thead>
                   <tbody>
                   <tr ng-repeat="servReq in servReqs" class="text-center">
                       <td>{{ $index + 1 }}</td>
                       <td>{{servReq._patCase._patient._user.realName}}</td>
                       <td translate="{{'business.patcase.disease_type_' + servReq._diseaseType.desc}}"></td>
                       <td>{{servReq.paid_Amount | currency:'￥'}}</td>
                       <td>{{servReq.amount_Operation | currency:'￥'}}</td>
                       <td>{{servReq.amount_Regional}}</td>
                       <td>{{servReq._med_Regional.realName}}</td>
                       <td>{{servReq.amount_Expert | currency:'￥'}}</td>
                       <td>{{servReq._med_Expert.realName}}</td>
                       <td>{{servReq.amount_Operator | currency:'￥'}}</td>
                       <td>{{servReq._opeCenTime._surgeon.realName}}</td>
                       <td>{{servReq.amount_Platform | currency:'￥'}}</td>
                       <td class="text-center">{{moment(servReq._opeCenTime.date_Operation).format("YYYY-MM-DD")}}</td>
                       <td>{{servReq.paid_Date == null ? '-' : moment(servReq.paid_Date).format('YYYY-MM-DD')}}</td>
                   </tr>
                   <tr class="text-center">
                       <td translate="common.summary"></td>
                       <td></td>
                       <td></td>
                       <td>{{summaryOfPaid_Amount | currency:'￥'}}</td>
                       <td>{{summaryOfAmount_Operation | currency:'￥'}}</td>
                       <td>{{summaryOfAmount_Regional}}</td>
                       <td></td>
                       <td>{{summaryOfAmount_Expert | currency:'￥'}}</td>
                       <td></td>
                       <td>{{summaryOfAmount_Operator | currency:'￥'}}</td>
                       <td></td>
                       <td>{{summaryOfAmount_Platform | currency:'￥'}}</td>
                       <td></td>
                       <td></td>
                   </tr>
                   </tbody>
               </table>

               <table class="table table-bordered" style="background:#FFF;" align="center" ng-repeat="servReq in servReqs"
                      ng-if="!!isSmart">
                   <tr class="panel-heading">
                       <td class="text-center" translate="common.number" width="50%">No.</td>
                       <td class="text-center">{{ $index + 1 }}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="common.name" width="50%">No.</td>
                       <td class="text-center">{{servReq._patCase._patient._user.realName}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.patcase.disease_type">No.</td>
                       <td class="text-center">{{'business.patcase.disease_type_' + servReq._diseaseType.desc | translate}}
                       </td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.servreq.paymentAmount">No.</td>
                       <td class="text-center">{{servReq.paid_Amount}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.servreq.amount_Operation">No.</td>
                       <td class="text-center">{{servReq.amount_Operation}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.servreq.amount_Regional">No.</td>
                       <td class="text-center">{{servReq.amount_Regional}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.servreq.Regional_name">No.</td>
                       <td class="text-center">{{servReq._med_Regional.realName}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.servreq.amount_Expert">No.</td>
                       <td class="text-center">{{servReq.amount_Expert}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.servreq.Expert_name">No.</td>
                       <td class="text-center">{{servReq._med_Expert.realName}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.servreq.amount_Operator">No.</td>
                       <td class="text-center">{{servReq.amount_Operator}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.servreq.Operator_name">No.</td>
                       <td class="text-center">{{servReq._opeCenTime._surgeon.realName}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.servreq.amount_Platform">No.</td>
                       <td class="text-center">{{servReq.amount_Platform}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.accumulation.dateOpe">No.</td>
                       <td class="text-center">{{moment(servReq._opeCenTime.date_Operation).format("YYYY-MM-DD")}}</td>
                   </tr>

                   <tr>
                       <td class="text-center" translate="business.servreq.paid_Date">No.</td>
                       <td class="text-center">{{servReq.paid_Date == null ? '-' :
                           moment(servReq.paid_Date).format('YYYY-MM-DD')}}
                       </td>
                   </tr>

               </table>

               <table class="table table-bordered" style="background:#FFF;" ng-if="!!isSmart">
                   <tr class="text-center">
                       <td width="50%"><span translate="business.servreq.paymentAmount"></span><span
                               translate="common.summary"></span></td>
                       <td width="50%">{{summaryOfPaid_Amount}}</td>
                   </tr>

                   <tr class="text-center">
                       <td><span translate="business.servreq.amount_Operation"></span><span translate="common.summary"></span>
                       </td>
                       <td>{{summaryOfAmount_Operation}}</td>
                   </tr>

                   <tr class="text-center">
                       <td><span translate="business.servreq.amount_Regional"></span><span translate="common.summary"></span>
                       </td>
                       <td>{{summaryOfAmount_Regional}}</td>
                   </tr>

                   <tr class="text-center">
                       <td><span translate="business.servreq.amount_Expert"></span><span translate="common.summary"></span>
                       </td>
                       <td>{{summaryOfAmount_Expert}}</td>
                   </tr>

                   <tr class="text-center">
                       <td><span translate="business.servreq.amount_Operator"></span><span translate="common.summary"></span>
                       </td>
                       <td>{{summaryOfAmount_Operator}}</td>
                   </tr>

                   <tr class="text-center">
                       <td><span translate="business.servreq.amount_Platform"></span><span translate="common.summary"></span>
                       </td>
                       <td>{{summaryOfAmount_Platform}}</td>
                   </tr>
               </table>
           </div>

        </div>
    </div>
</div>
